package net.melon.uploader.service.impl;

import java.io.File;
import java.util.Calendar;

import net.melon.uploader.service.PathRule;

public class DateSplitPathRule implements PathRule {

	
	@Override
	public String getRelativePath(File file,String filename,Object... args) {
		Calendar c = Calendar.getInstance();
		StringBuilder sb = new StringBuilder();
		sb.append(c.get(Calendar.YEAR)).append(File.separator).append(c.get(Calendar.MONTH)+1).append(File.separator).append(c.get(Calendar.DAY_OF_MONTH)).append(File.separator);
		return sb.toString();
	}

}
